package com.example.cloudalibabaconsumernacosorder84.controller;

import com.example.cloudalibabaconsumernacosorder84.service.PaymentService;
import com.ljy.springcloud.entities.CommonResult;
import com.ljy.springcloud.entities.Payment;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class UseFeignController {

    @Autowired
    private PaymentService paymentService;

    @GetMapping("/consumer/feign/{id}")
    public CommonResult<Payment> fallback(@PathVariable Long id){
        return paymentService.paymentSQL(id);
    }

}

